package com.jt.www.model.correct.vo;

import com.jt.www.exception.ParamException;
import com.jt.www.model.param.BaseParam;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.StringUtils;


public class ApproveParam implements BaseParam {

    @ApiModelProperty(value = "审批节点id", required = true)
    private Long nodeId;

    @ApiModelProperty(value = "关联单号", required = true)
    private String correctNo;

    @ApiModelProperty(value = "审核人名称", required = true)
    private String toExamineUser;

    @ApiModelProperty(value = "审核人userCode", required = true)
    private String toExamineCode;

    @ApiModelProperty(value = "审核状态 1 同意 2 不同意 3退回", required = true)
    private Integer status;

    @ApiModelProperty(value = "审核意见", required = true)
    private String comment;

    @ApiModelProperty(value = "渠道编码", required = true)
    private String channel;


    @Override
    public void checkParam() throws ParamException {
        if (status == null) {
            throw new ParamException("审核状态不能为空");
        }
        if (StringUtils.isBlank(comment)) {
            throw new ParamException("审核意见不能为空");
        }
        if (StringUtils.isEmpty(channel)) {
            throw new ParamException("渠道编码不能为空");
        }
    }

    public Long getNodeId() {
        return nodeId;
    }

    public void setNodeId(Long nodeId) {
        this.nodeId = nodeId;
    }

    public String getCorrectNo() {
        return correctNo;
    }

    public void setCorrectNo(String correctNo) {
        this.correctNo = correctNo;
    }

    public String getToExamineUser() {
        return toExamineUser;
    }

    public void setToExamineUser(String toExamineUser) {
        this.toExamineUser = toExamineUser;
    }

    public String getToExamineCode() {
        return toExamineCode;
    }

    public void setToExamineCode(String toExamineCode) {
        this.toExamineCode = toExamineCode;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }
}
